Skip to content

fix: alarm scheduling lives on storage, not state - #12

Merged
JordanNewell merged 1 commit into
mainfrom
fix/alarm-surface
Dec 3, 2026
Merged

JordanNewell merged 1 commit into
mainfrom
fix/alarm-surface

Conversation

@JordanNewell

Copy link
Copy Markdown
Contributor

Layer 3 of the presence root-cause chain (caught live on wrangler tail after #11): TypeError: this.ctx.setAlarm is not a function — DurableObjectState has no setAlarm at runtime; the real API is state.storage.setAlarm. The repo's hand-rolled ambient types declared the nonexistent surface (setAlarm/getAlarm directly on DurableObjectState, plus hibernation methods), which is why typecheck never caught any of this. Moves setAlarm/getAlarm onto the DurableObjectStorage ambient type, drops the now-unused hibernation methods, and points the 3 call sites at ctx.storage.setAlarm. 25/25 green.

@JordanNewell
JordanNewell merged commit 3c2e822 into main Dec 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant